package com.lw.io.bytestream;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Arrays;

public class FIleOutputStreamTest {
    public static void main(String[] args) throws IOException {
        //创建一个字节流的实例
        //类加载器
        OutputStream outputStream = new FileOutputStream("test.txt");
        outputStream.write(97);
        outputStream.close();
        OutputStream outputStream1 = new FileOutputStream("test2.txt");
        byte[] bytes = "刘伟".getBytes();
        System.out.println(Arrays.toString(bytes));
        outputStream1.write(bytes);
        outputStream.close();
    }
}

